<template>
  <div id="scroll-board">
    <dv-scroll-board :config="config" />
  </div>
</template>

<script>
import { commonMethod } from '@/api/mapper/index.js';
export default {
  name: 'ScrollBoard',
  data() {
    return {
      config: {}
    };
  },
  created() {
    setTimeout(() => {
      commonMethod({
        filterList: [],
        pageIndex: 0,
        pageSize: 100,
        pageType: 1,
        tableId: 485
      }).then(res => {
        const list = [];
        res.data.map(o => {
          list.push([
            o.JBYS_CJMCT, o.JBYS_ZRDWT, o.SSLY, o.CJMS, o.JBYS_CJJSSJT
          ]);
        });
        console.log(list);
        this.config = {
          header: ['项目名称', '承办单位', '所属领域', '区域', '申报时间'],
          data: list,
          columnWidth: [250, 140, 120, 150, 180],
          align: ['center'],
          rowNum: 7,
          headerBGC: '#1981f6',
          headerHeight: 45,
          oddRowBGC: 'rgba(0, 44, 81, 0.8)',
          evenRowBGC: 'rgba(10, 29, 50, 0.8)'
        };
      });
    }, 500);
  }
};
</script>

<style lang="scss" scoped>
#scroll-board {
  box-sizing: border-box;
  height: 100%;
  overflow: hidden;
}
.dv-scroll-board {
    position: relative;
    width: 100%;
    height: calc(45vh);
    color: #fff;
}
</style>
